﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ObserverEvent
{
    class Program
    {
        static void Main(string[] args)
        {
            CatSubject cat = new CatSubject();

            HumanObserver human = new HumanObserver();
            MouseObserver mouse = new MouseObserver();

            cat.Update += new CatSubject.EventHandler(human.Action);
            cat.Update += new CatSubject.EventHandler(mouse.RunAway);

            cat.Notify();
        }
    }
}
